// 内置字段配置
export const BUILTIN_FIELDS = [
  {
    label: '名称',
    prop: 'name',
    order: 0,
  },
  {
    label: '状态',
    prop: 'status',
    width: 120,
    valueType: 'select',
    order: 'computed(() => 100)',
    options: [
      {
        label: '未解决',
        value: '0',
        color: 'red',
      },
      {
        label: '已解决',
        value: '1',
        color: 'blue',
      },
      {
        label: '解决中',
        value: '2',
        color: 'yellow',
      },
      {
        label: '失败',
        value: '3',
        color: 'red',
      },
    ],
  },
  {
    label: '标签',
    prop: 'tag',
    width: 120,
    valueType: 'tag',
    order: 2,
    fieldProps: '(value: string) => ({ type: value })',
  },
  {
    label: '执行进度',
    prop: 'progress',
    width: 200,
    valueType: 'progress',
    fieldProps:
      "(value: number) => { const data = value >= 80 ? { status: 'success' } : value > 50 ? { status: 'exception' } : { status: 'warning' }; return data }",
  },
  {
    label: '开关',
    prop: 'switch',
    width: 100,
    hideInSearch: true,
    valueType: 'switch',
    editable: true,
  },
  {
    label: '时间',
    prop: 'time',
    valueType: 'date-picker',
    hideInForm: true,
  },
]
